import {
  bankcardList
} from "../../../api.js"
Page({

  /**
   * 页面的初始数据
   */
  data: {
    bankList: [],
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onShow: function (options) {
    var that = this
    bankcardList(
      getApp().globalData.Store.token
    ).then(res => {
      if (res.data.code == 666) {
        that.setData({
          bankList: res.data.data
        })
      }
    })
    getApp().startpage(new Date().getTime())
  },
  onHide() {
    getApp().endpage(new Date().getTime())
  },
  newBank() {
    wx.navigateTo({
      url: '/pages/myList/bankCard/newBankCard/newBankCard',
    })
  },
  handleAddressEdit(e) {
    var id = e.currentTarget.dataset.id
    wx.navigateTo({
      url: '/pages/myList/bankCard/newBankCard/newBankCard?id=' + id,
    })
  },

})